import React from 'react';

import ReactDOM from 'react-dom';

import {
  BrowserRouter as Router,
  Route,
  Switch
} from 'react-router-dom';

import { Provider } from 'react-redux';

import * as serviceWorker from './serviceWorker';

import store from './store';

import App from './App';

import { Login } from './pages';

import './index.less';
//<Router path="/login" component={ Login }/>
ReactDOM.render(
  <Provider store={store}>
    <Router>
      <Switch>
        <Route path="/login" component={ Login }/>
        <Route component={App}/>
      </Switch>
    </Router>
  </Provider>, 
  
  document.getElementById('root')
);

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: http://bit.ly/CRA-PWA
serviceWorker.unregister();